=========================================================================== BBS: The Abacus * HST/DS * Potterville MI Date: 02-28-93 (17:05) Number: 25 From: VICTOR YIU Refer#: NONE To: ALL Recvd: NO Subj: PostIt! 5.0 10/11 Conf: (35) Quick Basi --------------------------------------------------------------------------- '>>> Start of page 10. FUNCTION Num2Str$ (A) Num2Str$ = MID$(STR$(A), 2) END FUNCTION 'Outputs one line to the output file, and opens another output file 'if the page length is exceeded. SUB Print.Line (A$) SHARED Lines.Out, Page.Length, Current.Page SHARED Dest.File$, Dest.Exten$ SHARED Total.Lines.Out, New.File.Flag, Prefix$ SHARED Row, Col IF LEFT$(A$, 2) = Prefix$ THEN ' calling compression here! A$ = Compress$(A$) END IF IF New.File.Flag THEN LOCATE Row, Col PRINT " " New.File.Flag = False Current.Page = Current.Page + 1 '<-!-+*** switched these 2 lines B$ = Num2Str$(Current.Page) '<-!-+*** because the other way PRINT #2, "'>> Continued on pg. "; B$ '*** around causes just ' one CLOSE #2 '*** single output filename '*** to be written over & over '*** -!!-> MHB F$ = UCASE$(Dest.File$ + B$ + Dest.Exten$) PRINT "Now writing: "; F$; " "; Row = CSRLIN: Col = POS(0) OPEN F$ FOR OUTPUT AS #2 LEN = 8192 PRINT #2, "'>> Start: pg. "; B$ Lines.Out = 1 END IF Total.Lines.Out = Total.Lines.Out + 1 PRINT #2, A$ '<-- hardcoded a space to the end of each ' full G-sub data line to attempt to ' thwart truncation on the Net. ' I hope this works!!!!! ;-) -!-> MHB ' Sorry, I had to remove the space; it was interfering with the ' decompression routine; but not to worry -- since not all lines ' are the same length, maybe that will do the trick... -VY Lines.Out = Lines.Out + 1 IF Lines.Out >= Page.Length THEN New.File.Flag = True END SUB 'Adds a character to the output string. SUB PutByte (A) SHARED Work$, Line.Length, BytesOut, Prefix$ SHARED CheckSum BytesOut = BytesOut + 1 'translate the output character into something safe Work$ = Work$ + MID$("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQR"+_ "STUVWXYZ0123456789()", A + 1, 1) 'calculate a checksum on the encoded data stream CheckSum = (CheckSum + A) * 2 CheckSum = CheckSum \ 256 + (CheckSum AND 255) 'if we have a complete line then write it out 'Originally Mark Butler added a CHR$(34) to the end of each string 'so mail readers wouldn't mess up the script when they added an 'extra space to the end of a line. This version uses the LEFT$() 'function to eliminate any extra spaces that were appended 'to the end of a line. The only exception to this is the very last 'line of the encoded data stream, which usually doesn't take up a 'complete line. A CHR$(34) is added to the end of this line, 'because the LEFT$() trick won't work with it. IF LEN(Work$) = Line.Length THEN Print.Line Work$ Work$ = Prefix$ END IF END SUB SUB PutBytes (A) SHARED Shift(), CurrentBit, Char 'shift the 8 bit character into the work buffer '>>> Continued on page 11. --- Blue Wave/RA v2.10 [NR] * Origin: Hard Disc Cafe / Houston Texas / (713) 589-2690 / Node -*N (1:106/30. 0) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 950 203/23 209/209 280/1 SEEN-BY: 390/1 396/1 15 397/2 2230/100 3603/20